<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="操作说明,">










<meta name="description" content="Hexo编写博客工具工具推荐使用Typora,程序员必备神器（Typora)。你也可以使用Sublime Text 3来写，Sublime Text 3写的话需要写MD语法。我是使用的后者，诸位随意。 Hexo在博文中插入图片-插入本地图片 -插入有链接的图片 插入本地图片插入本地图片需要修改主题’ _conf ig.yml’配置文件’ post_asset_folder’项为’ true’。使用">
<meta name="keywords" content="操作说明">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo编写博客技巧">
<meta property="og:url" content="http://chinawfsl.gitee.io/blog/2019/03/21/Hexo编写博客技巧/index.html">
<meta property="og:site_name" content="无名小卒">
<meta property="og:description" content="Hexo编写博客工具工具推荐使用Typora,程序员必备神器（Typora)。你也可以使用Sublime Text 3来写，Sublime Text 3写的话需要写MD语法。我是使用的后者，诸位随意。 Hexo在博文中插入图片-插入本地图片 -插入有链接的图片 插入本地图片插入本地图片需要修改主题’ _conf ig.yml’配置文件’ post_asset_folder’项为’ true’。使用">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://bmob-cdn-20430.b0.upaiyun.com/2018/07/20/d6bfd2a040c487af8072834dfa4d3388.png">
<meta property="og:updated_time" content="2019-03-21T06:40:50.841Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Hexo编写博客技巧">
<meta name="twitter:description" content="Hexo编写博客工具工具推荐使用Typora,程序员必备神器（Typora)。你也可以使用Sublime Text 3来写，Sublime Text 3写的话需要写MD语法。我是使用的后者，诸位随意。 Hexo在博文中插入图片-插入本地图片 -插入有链接的图片 插入本地图片插入本地图片需要修改主题’ _conf ig.yml’配置文件’ post_asset_folder’项为’ true’。使用">
<meta name="twitter:image" content="http://bmob-cdn-20430.b0.upaiyun.com/2018/07/20/d6bfd2a040c487af8072834dfa4d3388.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://chinawfsl.gitee.io/blog/2019/03/21/Hexo编写博客技巧/">





  <title>Hexo编写博客技巧 | 无名小卒</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">无名小卒</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">天下风云出我辈,一入江湖岁月催,皇图霸业谈笑中,不胜人生一场醉</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://chinawfsl.gitee.io/blog/blog/2019/03/21/Hexo编写博客技巧/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="无名小卒">
      <meta itemprop="description" content>
      <meta itemprop="image" content="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1553150146014&di=dc4e5d4bdfbc647f7eca1367401dbc47&imgtype=0&src=http%3A%2F%2Fs9.knowsky.com%2Fbizhi%2Fl%2F20090606%2F200906186%2520%25281%2529.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="无名小卒">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Hexo编写博客技巧</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-03-21T14:34:30+08:00">
                2019-03-21
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/操作说明/" itemprop="url" rel="index">
                    <span itemprop="name">操作说明</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="Hexo编写博客工具"><a href="#Hexo编写博客工具" class="headerlink" title="Hexo编写博客工具"></a>Hexo编写博客工具</h2><p>工具推荐使用Typora,<a href="https://liaichuan.top/2018/07/l8/程序员必备神S%EF%BC%8STypora%EF*BC紹9/" target="_blank" rel="noopener">程序员必备神器（Typora)</a>。你也可以使用Sublime Text 3来写，Sublime Text 3写的话需要写MD语法。我是使用的后者，诸位随意。</p>
<h2 id="Hexo在博文中插入图片"><a href="#Hexo在博文中插入图片" class="headerlink" title="Hexo在博文中插入图片"></a>Hexo在博文中插入图片</h2><p>-插入本地图片 -插入有链接的图片</p>
<h3 id="插入本地图片"><a href="#插入本地图片" class="headerlink" title="插入本地图片"></a>插入本地图片</h3><p>插入本地图片需要修改主题’ _conf ig.yml’配置文件’ post_asset_folder’项为’ true’。<br>使用插件达到插入本地图片，在根目录输入如下命令安装：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install hexo-asset-image --save</span><br></pre></td></tr></table></figure></p>
<p>今后你new _篇博客时’/source/_posts’文件夹内除了 xxxx.mcT文件还有一个同名的文件夹，把图片放到里面即可.<img src="http://bmob-cdn-20430.b0.upaiyun.com/2018/07/20/d6bfd2a040c487af8072834dfa4d3388.png" alt>最后在’xxxx.md’中想引入图片时，先把图片复制到xxxx这个文件夹中，然后只需要在xxxx.md中按照markdown的格式引入图片：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">![你想输入的替代文字](xxxx/图片名.jpg)  注：[]内也可以不添加文字</span><br></pre></td></tr></table></figure></p>
<h3 id="插入有链接的图片"><a href="#插入有链接的图片" class="headerlink" title="插入有链接的图片"></a>插入有链接的图片</h3><p>考虑到本地存放图片图片，一占用电脑内存，二来博客项目过于膨大，想一下，一篇博客三四张图片，10篇20篇以后呢?所以我们不能只有一种对策方法，凡事都有三种对策方法才行。当然了， 本地图片也有好处，存放更换频繁的、重要的、隐私的图片最佳选择。使用第三方平台保存图片的话，推荐使用<a href="https://www.bmob.cn/" target="_blank" rel="noopener">Bmob</a>和<a href="https://www.qiniu.com/" target="_blank" rel="noopener">七牛云</a>+MPic,我只讲BmohBniob对于个人有应用来说再好不过，一个月有20G免费存储空间。Bmob先注册一个好号，然后创建一个应用，最后上传素材。</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/操作说明/" rel="tag"># 操作说明</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2019/03/21/美图图集/" rel="next" title="美图图集">
                <i class="fa fa-chevron-left"></i> 美图图集
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2019/03/21/Java-code-generator/" rel="prev" title="Java代码生成器">
                Java代码生成器 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1553150146014&di=dc4e5d4bdfbc647f7eca1367401dbc47&imgtype=0&src=http%3A%2F%2Fs9.knowsky.com%2Fbizhi%2Fl%2F20090606%2F200906186%2520%25281%2529.jpg" alt="无名小卒">
            
              <p class="site-author-name" itemprop="name">无名小卒</p>
              <p class="site-description motion-element" itemprop="description">如果有天我们湮没在人潮中,庸碌一生,那是因为我们没有努力要活的丰盛</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">4</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">3</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">3</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-inline">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-globe"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="http://cyc2018.gitee.io/cs-notes/#/README" title="Java知识库" target="_blank">Java知识库</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://theme-next.iissnan.com/" title="NexT官方文档" target="_blank">NexT官方文档</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Hexo编写博客工具"><span class="nav-number">1.</span> <span class="nav-text">Hexo编写博客工具</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Hexo在博文中插入图片"><span class="nav-number">2.</span> <span class="nav-text">Hexo在博文中插入图片</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#插入本地图片"><span class="nav-number">2.1.</span> <span class="nav-text">插入本地图片</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#插入有链接的图片"><span class="nav-number">2.2.</span> <span class="nav-text">插入有链接的图片</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">无名小卒</span>

  
</div>


<div class="powered-by">
<i class="fa fa-user-md"></i><span id="busuanzi_container_site_uv">
  本站总访问量<span id="busuanzi_value_site_uv"></span>次
</span>
</div>
 <!-- <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>-->




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
